<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>IupGLControls</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel="stylesheet" type="text/css" href="../style.css">
<style type="text/css">
.style1 {
	font-size: large;
}
.style2 {
	border-style: solid;
	border-width: 1px;
}
.style3 {
	text-align: center;
}
.auto-style1 {
	line-height: 130%;
}
</style>
</head>
<body>

<h2 align="center">IupGLControls <span class="style1">(since 3.11)</span></h2>
<h3>OpenGL Controls Library</h3>
<p>This library contains several controls that behave much like their standard 
controls counterpart such as <strong>IupLabel</strong>, <strong>IupButton</strong>,
<strong>IupFrame</strong>, and so on. But they were designed to be used only 
embedded in an OpenGL canvas along with the application drawing. They will work 
and be displayed on top of the application drawing and respond to mouse events 
concurrently with the application mouse events.</p>
<p>In order to use these controls the application must use the <strong>
IupGLCanvasBox</strong> controls instead of the <strong>IupGLCanvas</strong> 
control. Actually the <strong>IupGLCanvasBox</strong> inherits from the<strong> 
IupGLCanvas</strong> control so their usage is identical. But <strong>
IupGLCanvasBox</strong> can have children and it will manage the display and 
mouse events of all its children.</p>
<p>All the <strong>IupGlControls</strong> visible elements that can be an embedded children of a <strong>
IupGLCanvasBox</strong> are based on the <strong>IupGLSubCanvas</strong> 
control. Other IUP elements can also be used. It will work seemsly elements that are void containers can also be used, such as
<strong>IupHbox</strong>, <strong>IupVbox</strong>, <strong>IupGridBox</strong>, 
and so on. <strong>IupFill</strong> can also be used, but native elements can 
also be placed on top although they will not be clipped by <strong>IupGLFrame</strong> 
and other <strong>IupGlControls</strong> containers. All functions and 
resources, like <strong>IupImage</strong>, are used just like any other IUP 
control.</p>
<p>These controls are drawn by IUP using OpenGL 
  on a <a href="ctrl/iupglcanvas.html">IupGLCanvas</a> control, and are 
  not native controls.</p>
<p>The <b>iupglcontrols.h</b> file must be included in the source code. If you plan to use the control in Lua, you 
  should also include <b>iupluaglcontrols.h</b>.</p>
<p>The <b>IupGLControlsOpen</b> function must be called after <b>IupOpen</b>. To make the controls available in Lua use require&quot;iupluaglcontrols&quot; or manually 
call the initialization function in C, 
<b>iupglcontrolslua_open</b>, after calling <b>iuplua_open</b>.</p>
<p>When manually calling the function your application must be linked to the control library (<strong>iupglcontrols</strong>), the 
<strong>IupGLCanvas</strong> control library (<strong>iupgl</strong>), with the 
FTGL library, and with the 
OpenGL library. To use its bindings to Lua, the program must also be linked to the 
<strong>iupluaglcontrols</strong> library.</p>
<p class="auto-style1">
  The FTGL library is dependent also on the GLU library and on the Freetype 
  library. In UNIX,
  <strong>IupGLControls</strong> is 
  also dependent on&nbsp;<strong>fontconfig</strong>.&nbsp;</p>
<p class="auto-style1">
  The <a href="ftgl.txt">FTGL</a> and <a href="freetype.txt">Freetype</a> 
  libraries use the licenses that are compatible with the IUP license.</p>
  
<h3><a name="Examples">Examples</a></h3>
<p><a href="../examples/">Browse for Example Files</a></p>
<p class="style3"><img src="gl/glcanvascube.png" class="style2"></p>

</body>

</html>
